<template>
  <div class="mine-container">
    <div class="mui-scroll-wrapper">
      <div class='mui-scroll'>
        <div class="mui-card">
          <div class="mui-card-content">
            <div class="mui-card-content-inner mine-header">
              <ul class="mui-table-view mui-table-view-chevron">
                <li class="mui-table-view-cell mui-media headicon-container">
                    <img class=" mui-pull-left headicon"
                    :src="currentLoginUser.headicon || $imHeadIcon">
                    <div class="mui-media-body headicon-text">
                      {{currentLoginUser.username}}
                      <p class='mui-ellipsis'>环信号:{{currentLoginUser.nickname}}</p>
                    </div>
                </li>
                  <li class="narrow-right">
                    <span class="mui-icon mui-icon-arrowright"></span>
                  </li>
              </ul>
            </div>
          </div>
        </div>
        <div class="mui-card">
          <div class="mui-card-content mine-content">
            <div class="mui-card-content-inner">
              <ul class="mui-table-view mui-table-view-chevron mine-list">
                <li class="mui-table-view-cell mui-media">
                  <a class="mui-navigate-right">
                    <span class="mui-icon-extra mui-icon-extra-heart mui-pull-left"></span>
                    <div class="mui-media-body">
                      收藏
                    </div>
                  </a>
                </li>
                <li class="mui-table-view-cell mui-media">
                  <a class='mui-navigate-right' href="javascript:;">
                    <span class="mui-icon mui-icon-image mui-pull-left"></span>
                    <div class="mui-media-body">
                      相册
                    </div>
                  </a>
                </li>
                <li class="mui-table-view-cell mui-media">
                  <a class="mui-navigate-right">
                    <span class="mui-icon-extra mui-icon-extra-card mui-pull-left"></span>
                    <div class="mui-media-body">
                      卡包
                    </div>
                  </a>
                </li>
                <li class="mui-table-view-cell mui-media">
                  <a class="mui-navigate-right">
                    <img class="mui-pull-left emotion" src="http://minichat.guozhengfeng.cn/mineview/emotionicon.png">
                    <div class="mui-media-body emotion-text">
                      表情
                    </div>
                  </a>
                </li>
              </ul>
            </div>
          </div>
        </div>
        <unlogin></unlogin>
      </div>
    </div>
  </div>
</template>

<script>
  import unlogin from './Unlogin'
  import {mapState} from 'vuex'
  export default {
    components: {
      unlogin
    },
    computed: {
      ...mapState(['currentLoginUser'])
    },
    mounted() {
      this.init()
      console.log(this.currentLoginUser, 'ooooooooooooominepersoninfoview')
    },
    methods: {
      init() {
        var self = this
        self.$immui.init()
        self.$immui('.mine-container').on('tap', '.headicon-container', function(e) {
          self.$router.push('/minepersoninfoview')
        })
      }
    }
  }
</script>

<style lang='scss' scoped>
.mine-header{
  height: 25vh;
  .headicon-container{
    height: 25vh;
    display: flex;
    align-items: center;
    .headicon{
      flex: 0 0 120px;
      height: 120px;
      width: 120px;
    }
    .headicon-text{
      flex: 1;
      padding-left: 20px;
      font-size: 22px;
      p{
        padding-top: 10px;
      }
    }
  }
  .narrow-right{
    position: absolute;
    right: 0;
    top: 40%;
    width: 50px;
    height: 50px;
    text-align: center;
    line-height: 50px;
  }

}
.emotion{
  width: 28px;
  height: 28px;
  position: absolute;
  bottom: 18px;
  left: 22px;
}
.emotion-text{
  padding-left: 56px;
}
.mui-card{
  margin: 0 0 10px 0 !important;
}
.mui-card-content .mui-card-content-inner{
  padding: 0!important;
}
.mui-scroll-wrapper {
  top: 40px;
  bottom: 53px;
}
.mine-list{
  font-size: 16px;
  li {
    min-height: 60px;
    line-height: 40px;
    span{
      font-size: 30px;
      line-height: 40px;
      // vertical-align: middle;
      padding-right: 20px;
      padding-left: 6px;
    }
  }
}
</style>
